package com.heisenhub.file.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.heisenhub.common.db.model.IsDel;
import com.heisnenhub.common.module.entity.IBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author sen
 * @since 2024-03-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class OpFile extends IsDel implements IBaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 原始文件名称
     */
    private String originalName;

    /**
     * 文件夹名称or桶的名称
     */
    private String folderName;

    /**
     * 文件标签，可用于业务隔离
     */
    private String tag;

    /**
     * 后端系统名称
     */
    private String storeService;

    /**
     * 实际文件存储位置
     */
    private String storePath;

    /**
     * 新文件名称
     */
    private String fileName;

    /**
     * 文件拥有者
     */
    private String owner;

    /**
     * 文件访问控制等级
     */
    private String resourceScope;

    /**
     * 文件状态，0待上传，1已上传，2已删除
     */
    private Integer status;

    /**
     * 文件大小  字节
     */
    private Long size;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 创建者
     */
    private String creator;

    /**
     * 更新时间
     */
    private Date updatetime;

    /**
     * 更新者
     */
    private String updater;

    @TableField(exist = false)
    private String fileUrl;

    public static final String ID = "id";

    public static final String ORIGINAL_NAME = "original_name";

    public static final String FOLDER_NAME = "folder_name";

    public static final String TAG = "tag";

    public static final String STORE_SERVICE = "store_service";

    public static final String STORE_PATH = "store_path";

    public static final String FILE_NAME = "file_name";

    public static final String OWNER = "owner";

    public static final String RESOURCE_SCOPE = "resource_scope";

    public static final String STATUS = "status";

    public static final String CREATETIME = "createtime";

    public static final String CREATOR = "creator";

    public static final String UPDATETIME = "updatetime";

    public static final String UPDATER = "updater";

}
